package com.share.design.facade;

/**
 * author:caifan
 * date:2020/2/5
 */
public class Computer {

    private CPU cpu;
    private Memory memory;
    private Disk disk;

    public Computer() {
        cpu = new CPU();
        memory = new Memory();
        disk = new Disk();
    }


    public void startup() {
        cpu.start();
        memory.start();
        disk.start();
    }

    public void shutdown() {
        cpu.shutdown();
        memory.shutdown();
        disk.shutdown();
    }
}
